package com.ysc.demo

import androidx.appcompat.app.AppCompatActivity
import android.os.Bundle
import android.os.NetworkOnMainThreadException
import com.ysc.plugin.common.abstract.ManagerModule
import com.ysc.plugin.utility.Utility
import com.ysc.plugin.utility.network.NetWorkManager
import java.lang.reflect.Method


class MainActivity : AppCompatActivity() {


    override fun onCreate(savedInstanceState: Bundle?) {
        super.onCreate(savedInstanceState)
        var w = "command:photo;\n" +
                "category:OpenPhoto;\n" +
                "operate:{\n" +
                "  openDefaultCamera:打开默认相机进行拍照,\n" +
                "    parameter:{\n" +
                "      pictureRotate:设置拍照后图片旋转角度\n" +
                "      pictureName:保存图片的名称\n" +
                "      storageDirName:图片存储目录文件夹名称\n" +
                "      pictureType:图片格式\n" +
                "    }\n" +
                "}"
        val p = 0
        setContentView(R.layout.activity_main)
        Utility().initialize(this)
        var t = Utility.getInstance()?.getPluginManagerByName("NetWorkManager") as NetWorkManager
        t.getNetSpeed()
        val ytyy = 0
        //PluginWrapper(this)
    }

    override fun onRequestPermissionsResult(
        requestCode: Int,
        permissions: Array<out String>,
        grantResults: IntArray
    ) {
        super.onRequestPermissionsResult(requestCode, permissions, grantResults)
        Utility.getInstance()?.onRequestPermissionsResult(requestCode, permissions, grantResults)
    }
}